﻿using System;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;

namespace Nahida.Rendering
{
    [Serializable]
    [VolumeComponentMenuForRenderPipeline("NPR/NPR Bloom", typeof(UniversalRenderPipeline))]
    public class NPRBloom : VolumeComponent, IPostProcessComponent
    {
        public MinFloatParameter threshold = new MinFloatParameter(0.7f, 0f);

        public MinFloatParameter intensity = new MinFloatParameter(0f, 0f);
        
        public MinFloatParameter blurRadius = new MinFloatParameter(2f, 0f);
        
        public VolumeParameter<NPRBloomPass.SampleQuality> sampleQuality = new VolumeParameter<NPRBloomPass.SampleQuality>();
        
        public bool IsActive() => intensity.value > 0;

        public bool IsTileCompatible() => false;
    }
}